// import Vue from 'vue';
// import VueRouter from 'vue-router';
if (VueRouter === undefined) {
  var VueRouter = window.VueRouter
}

const Home = () => import(/* webpackChunkName: "chunk-home" */'@/views/Home.vue')

const Poems = () => import(/* webpackChunkName: "chunk-poems" */'@/views/Poems.vue')

const Register = () => import(/* webpackChunkName: "chunk-users" */'@/views/user/Register.vue')
const Login = () => import(/* webpackChunkName: "chunk-users" */'@/views/user/Login.vue')

const ViewMat = () => import(/* webpackChunkName: "chunk-mats" */'@/views/mats/ViewMat.vue')



const routes = [
  { path: '/', component: Home },
  { path: '/poems', redirect: '/poems/fav'},
  { path: '/poems/fav', component: Poems},
  { path: '/poems/discover', component: Poems},
  { path: '/poems/resources', component: Poems},
  { path: '/mats/view/:mid', component: ViewMat},
  { path: '/user/register', component: Register },
  { path: '/user/login', component: Login },
]

const router = VueRouter.createRouter({
  history: VueRouter.createWebHashHistory(),
  routes
})

export default router